#ifndef FOG_FX
#define FOG_FX

float3 quadraticFog(float3 pos, float3 camera_pos, float3 surface_color, 
	float3 fog_color, float start_dist, float end_dist)
{
	float distance = length(pos - camera_pos);
	float factor = saturate((distance - start_dist) / (end_dist - start_dist));
	return lerp(surface_color, fog_color, factor * factor); 
}

#endif
